package fr.ensisa.sunspot.event;

public class DoubleIntegerEvent extends AbstractEvent {
	
	private int x;
	private int y;

	public DoubleIntegerEvent(int major, int minor) {
		super(major, minor);
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}
	
    public String toString () {
        StringBuffer tmp = new StringBuffer ();
        tmp.append (super.toString());
        tmp.append(" ");
        tmp.append(x);
        tmp.append(" ");
        tmp.append(y);
        return tmp.toString();
    }

    public IEvent clone() {
    	DoubleIntegerEvent copy = new DoubleIntegerEvent (getMajor(), getMinor());
        copy.setState(getState());
        copy.setTimeStamp(getTimeStamp());
        copy.setX(getX());
        copy.setY(getY());
        return copy;
    }	

}
